/*
** Lua binding: main
** Generated automatically by tolua++-1.0.92 on 05/17/09 22:51:51.
*/

#ifndef __cplusplus
#include "stdlib.h"
#endif
#include "string.h"

#include "tolua++.h"

/* Exported function */
TOLUA_API int  tolua_main_open (lua_State* tolua_S);

#include "../graphics.h"
#include "../input.h"
#include "../stage.h"
#include "../collision.h"

/* function to register type */
static void tolua_reg_types (lua_State* tolua_S)
{
 tolua_usertype(tolua_S,"Input");
 tolua_usertype(tolua_S,"Collision");
 tolua_usertype(tolua_S,"Stage");
 tolua_usertype(tolua_S,"Graphics");
}

/* function: GR_Instance */
#ifndef TOLUA_DISABLE_tolua_main_GR_Instance00
static int tolua_main_GR_Instance00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isnoobj(tolua_S,1,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   Graphics* tolua_ret = (Graphics*)  GR_Instance();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"Graphics");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GR_Instance'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: GR_CreateTextureFromFileS */
#ifndef TOLUA_DISABLE_tolua_main_GR_CreateTextureFromFileS00
static int tolua_main_GR_CreateTextureFromFileS00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Graphics",0,&tolua_err) ||
     !tolua_isstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Graphics* self = ((Graphics*)  tolua_tousertype(tolua_S,1,0));
  const char* textureFileName = ((const char*)  tolua_tostring(tolua_S,2,0));
  {
   int tolua_ret = (int)  GR_CreateTextureFromFileS(self,textureFileName);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GR_CreateTextureFromFileS'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: GR_ReleaseTexture */
#ifndef TOLUA_DISABLE_tolua_main_GR_ReleaseTexture00
static int tolua_main_GR_ReleaseTexture00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Graphics",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Graphics* self = ((Graphics*)  tolua_tousertype(tolua_S,1,0));
  int textureId = ((int)  tolua_tonumber(tolua_S,2,0));
  {
   GR_ReleaseTexture(self,textureId);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GR_ReleaseTexture'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: GR_RegisterModelS */
#ifndef TOLUA_DISABLE_tolua_main_GR_RegisterModelS00
static int tolua_main_GR_RegisterModelS00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Graphics",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,9,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Graphics* self = ((Graphics*)  tolua_tousertype(tolua_S,1,0));
  int textureId = ((int)  tolua_tonumber(tolua_S,2,0));
  float width = ((float)  tolua_tonumber(tolua_S,3,0));
  float height = ((float)  tolua_tonumber(tolua_S,4,0));
  float uvX = ((float)  tolua_tonumber(tolua_S,5,0));
  float uvY = ((float)  tolua_tonumber(tolua_S,6,0));
  float uvW = ((float)  tolua_tonumber(tolua_S,7,0));
  float uvH = ((float)  tolua_tonumber(tolua_S,8,0));
  {
   int tolua_ret = (int)  GR_RegisterModelS(self,textureId,width,height,uvX,uvY,uvW,uvH);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GR_RegisterModelS'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: GR_UnregisterModel */
#ifndef TOLUA_DISABLE_tolua_main_GR_UnregisterModel00
static int tolua_main_GR_UnregisterModel00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Graphics",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Graphics* self = ((Graphics*)  tolua_tousertype(tolua_S,1,0));
  int modelId = ((int)  tolua_tonumber(tolua_S,2,0));
  {
   GR_UnregisterModel(self,modelId);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GR_UnregisterModel'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: GR_PutSpriteS */
#ifndef TOLUA_DISABLE_tolua_main_GR_PutSpriteS00
static int tolua_main_GR_PutSpriteS00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Graphics",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,7,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Graphics* self = ((Graphics*)  tolua_tousertype(tolua_S,1,0));
  int modelId = ((int)  tolua_tonumber(tolua_S,2,0));
  float posX = ((float)  tolua_tonumber(tolua_S,3,0));
  float posY = ((float)  tolua_tonumber(tolua_S,4,0));
  float z = ((float)  tolua_tonumber(tolua_S,5,0));
  unsigned int color = ((unsigned int)  tolua_tonumber(tolua_S,6,0));
  {
   GR_PutSpriteS(self,modelId,posX,posY,z,color);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GR_PutSpriteS'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: IN_Instance */
#ifndef TOLUA_DISABLE_tolua_main_IN_Instance00
static int tolua_main_IN_Instance00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isnoobj(tolua_S,1,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   Input* tolua_ret = (Input*)  IN_Instance();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"Input");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IN_Instance'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: IN_IsPressed */
#ifndef TOLUA_DISABLE_tolua_main_IN_IsPressed00
static int tolua_main_IN_IsPressed00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Input",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Input* self = ((Input*)  tolua_tousertype(tolua_S,1,0));
  KeyStatusType t = ((KeyStatusType) (int)  tolua_tonumber(tolua_S,2,0));
  {
   bool tolua_ret = (bool)  IN_IsPressed(self,t);
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IN_IsPressed'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: IN_IsPressedTrigger */
#ifndef TOLUA_DISABLE_tolua_main_IN_IsPressedTrigger00
static int tolua_main_IN_IsPressedTrigger00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Input",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Input* self = ((Input*)  tolua_tousertype(tolua_S,1,0));
  KeyStatusType t = ((KeyStatusType) (int)  tolua_tonumber(tolua_S,2,0));
  {
   bool tolua_ret = (bool)  IN_IsPressedTrigger(self,t);
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IN_IsPressedTrigger'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: IN_IsReleasedTrigger */
#ifndef TOLUA_DISABLE_tolua_main_IN_IsReleasedTrigger00
static int tolua_main_IN_IsReleasedTrigger00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Input",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Input* self = ((Input*)  tolua_tousertype(tolua_S,1,0));
  KeyStatusType t = ((KeyStatusType) (int)  tolua_tonumber(tolua_S,2,0));
  {
   bool tolua_ret = (bool)  IN_IsReleasedTrigger(self,t);
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IN_IsReleasedTrigger'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Stage_Instance */
#ifndef TOLUA_DISABLE_tolua_main_Stage_Instance00
static int tolua_main_Stage_Instance00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isnoobj(tolua_S,1,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   Stage* tolua_ret = (Stage*)  Stage_Instance();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"Stage");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Stage_Instance'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Stage_Load */
#ifndef TOLUA_DISABLE_tolua_main_Stage_Load00
static int tolua_main_Stage_Load00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Stage",0,&tolua_err) ||
     !tolua_isstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Stage* self = ((Stage*)  tolua_tousertype(tolua_S,1,0));
  const char* stageFile = ((const char*)  tolua_tostring(tolua_S,2,0));
  {
   bool tolua_ret = (bool)  Stage_Load(self,stageFile);
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Stage_Load'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Stage_GetStageWidth */
#ifndef TOLUA_DISABLE_tolua_main_Stage_GetStageWidth00
static int tolua_main_Stage_GetStageWidth00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Stage",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Stage* self = ((Stage*)  tolua_tousertype(tolua_S,1,0));
  {
   int tolua_ret = (int)  Stage_GetStageWidth(self);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Stage_GetStageWidth'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Stage_GetStageHeight */
#ifndef TOLUA_DISABLE_tolua_main_Stage_GetStageHeight00
static int tolua_main_Stage_GetStageHeight00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Stage",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Stage* self = ((Stage*)  tolua_tousertype(tolua_S,1,0));
  {
   int tolua_ret = (int)  Stage_GetStageHeight(self);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Stage_GetStageHeight'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Stage_GetStageElement */
#ifndef TOLUA_DISABLE_tolua_main_Stage_GetStageElement00
static int tolua_main_Stage_GetStageElement00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Stage",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Stage* self = ((Stage*)  tolua_tousertype(tolua_S,1,0));
  int x = ((int)  tolua_tonumber(tolua_S,2,0));
  int y = ((int)  tolua_tonumber(tolua_S,3,0));
  {
   StageElementType tolua_ret = (StageElementType)  Stage_GetStageElement(self,x,y);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Stage_GetStageElement'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Collision_Instance */
#ifndef TOLUA_DISABLE_tolua_main_Collision_Instance00
static int tolua_main_Collision_Instance00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isnoobj(tolua_S,1,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   Collision* tolua_ret = (Collision*)  Collision_Instance();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"Collision");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Collision_Instance'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Collision_RegisterS */
#ifndef TOLUA_DISABLE_tolua_main_Collision_RegisterS00
static int tolua_main_Collision_RegisterS00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Collision",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,7,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Collision* self = ((Collision*)  tolua_tousertype(tolua_S,1,0));
  float px = ((float)  tolua_tonumber(tolua_S,2,0));
  float py = ((float)  tolua_tonumber(tolua_S,3,0));
  float w = ((float)  tolua_tonumber(tolua_S,4,0));
  float h = ((float)  tolua_tonumber(tolua_S,5,0));
  CollisionType t = ((CollisionType) (int)  tolua_tonumber(tolua_S,6,0));
  {
   int tolua_ret = (int)  Collision_RegisterS(self,px,py,w,h,t);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Collision_RegisterS'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Collision_Unregister */
#ifndef TOLUA_DISABLE_tolua_main_Collision_Unregister00
static int tolua_main_Collision_Unregister00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Collision",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Collision* self = ((Collision*)  tolua_tousertype(tolua_S,1,0));
  int collisionId = ((int)  tolua_tonumber(tolua_S,2,0));
  {
   Collision_Unregister(self,collisionId);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Collision_Unregister'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Collision_MoveS */
#ifndef TOLUA_DISABLE_tolua_main_Collision_MoveS00
static int tolua_main_Collision_MoveS00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Collision",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,5,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Collision* self = ((Collision*)  tolua_tousertype(tolua_S,1,0));
  int collisionId = ((int)  tolua_tonumber(tolua_S,2,0));
  float vWantX = ((float)  tolua_tonumber(tolua_S,3,0));
  float vWantY = ((float)  tolua_tonumber(tolua_S,4,0));
  {
   Collision_MoveS(self,collisionId,vWantX,vWantY);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Collision_MoveS'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Collision_ResultGetPosLeftX */
#ifndef TOLUA_DISABLE_tolua_main_Collision_ResultGetPosLeftX00
static int tolua_main_Collision_ResultGetPosLeftX00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Collision",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Collision* self = ((Collision*)  tolua_tousertype(tolua_S,1,0));
  int collisionId = ((int)  tolua_tonumber(tolua_S,2,0));
  {
   float tolua_ret = (float)  Collision_ResultGetPosLeftX(self,collisionId);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Collision_ResultGetPosLeftX'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Collision_ResultGetPosBottomY */
#ifndef TOLUA_DISABLE_tolua_main_Collision_ResultGetPosBottomY00
static int tolua_main_Collision_ResultGetPosBottomY00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Collision",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Collision* self = ((Collision*)  tolua_tousertype(tolua_S,1,0));
  int collisionId = ((int)  tolua_tonumber(tolua_S,2,0));
  {
   float tolua_ret = (float)  Collision_ResultGetPosBottomY(self,collisionId);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Collision_ResultGetPosBottomY'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Collision_ResultGetResultType */
#ifndef TOLUA_DISABLE_tolua_main_Collision_ResultGetResultType00
static int tolua_main_Collision_ResultGetResultType00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Collision",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Collision* self = ((Collision*)  tolua_tousertype(tolua_S,1,0));
  int collisionId = ((int)  tolua_tonumber(tolua_S,2,0));
  {
   CollisionResultType tolua_ret = (CollisionResultType)  Collision_ResultGetResultType(self,collisionId);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Collision_ResultGetResultType'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Collision_ResultGetVX */
#ifndef TOLUA_DISABLE_tolua_main_Collision_ResultGetVX00
static int tolua_main_Collision_ResultGetVX00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Collision",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Collision* self = ((Collision*)  tolua_tousertype(tolua_S,1,0));
  int collisionId = ((int)  tolua_tonumber(tolua_S,2,0));
  {
   float tolua_ret = (float)  Collision_ResultGetVX(self,collisionId);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Collision_ResultGetVX'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Collision_ResultGetVY */
#ifndef TOLUA_DISABLE_tolua_main_Collision_ResultGetVY00
static int tolua_main_Collision_ResultGetVY00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Collision",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Collision* self = ((Collision*)  tolua_tousertype(tolua_S,1,0));
  int collisionId = ((int)  tolua_tonumber(tolua_S,2,0));
  {
   float tolua_ret = (float)  Collision_ResultGetVY(self,collisionId);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Collision_ResultGetVY'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: Collision_ResultIsLanded */
#ifndef TOLUA_DISABLE_tolua_main_Collision_ResultIsLanded00
static int tolua_main_Collision_ResultIsLanded00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Collision",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Collision* self = ((Collision*)  tolua_tousertype(tolua_S,1,0));
  int collisionId = ((int)  tolua_tonumber(tolua_S,2,0));
  {
   bool tolua_ret = (bool)  Collision_ResultIsLanded(self,collisionId);
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Collision_ResultIsLanded'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* Open function */
TOLUA_API int tolua_main_open (lua_State* tolua_S)
{
 tolua_open(tolua_S);
 tolua_reg_types(tolua_S);
 tolua_module(tolua_S,NULL,0);
 tolua_beginmodule(tolua_S,NULL);
  tolua_function(tolua_S,"GR_Instance",tolua_main_GR_Instance00);
  tolua_function(tolua_S,"GR_CreateTextureFromFileS",tolua_main_GR_CreateTextureFromFileS00);
  tolua_function(tolua_S,"GR_ReleaseTexture",tolua_main_GR_ReleaseTexture00);
  tolua_function(tolua_S,"GR_RegisterModelS",tolua_main_GR_RegisterModelS00);
  tolua_function(tolua_S,"GR_UnregisterModel",tolua_main_GR_UnregisterModel00);
  tolua_function(tolua_S,"GR_PutSpriteS",tolua_main_GR_PutSpriteS00);
  tolua_function(tolua_S,"IN_Instance",tolua_main_IN_Instance00);
  tolua_constant(tolua_S,"KS_Up",KS_Up);
  tolua_constant(tolua_S,"KS_Down",KS_Down);
  tolua_constant(tolua_S,"KS_Left",KS_Left);
  tolua_constant(tolua_S,"KS_Right",KS_Right);
  tolua_constant(tolua_S,"KS_A",KS_A);
  tolua_constant(tolua_S,"KS_B",KS_B);
  tolua_constant(tolua_S,"KS_Start",KS_Start);
  tolua_constant(tolua_S,"KS_NUM",KS_NUM);
  tolua_function(tolua_S,"IN_IsPressed",tolua_main_IN_IsPressed00);
  tolua_function(tolua_S,"IN_IsPressedTrigger",tolua_main_IN_IsPressedTrigger00);
  tolua_function(tolua_S,"IN_IsReleasedTrigger",tolua_main_IN_IsReleasedTrigger00);
  tolua_function(tolua_S,"Stage_Instance",tolua_main_Stage_Instance00);
  tolua_function(tolua_S,"Stage_Load",tolua_main_Stage_Load00);
  tolua_function(tolua_S,"Stage_GetStageWidth",tolua_main_Stage_GetStageWidth00);
  tolua_function(tolua_S,"Stage_GetStageHeight",tolua_main_Stage_GetStageHeight00);
  tolua_constant(tolua_S,"SE_None",SE_None);
  tolua_constant(tolua_S,"SE_Brick",SE_Brick);
  tolua_constant(tolua_S,"SE_Player",SE_Player);
  tolua_constant(tolua_S,"SE_Goal",SE_Goal);
  tolua_constant(tolua_S,"SE_NUM",SE_NUM);
  tolua_function(tolua_S,"Stage_GetStageElement",tolua_main_Stage_GetStageElement00);
  tolua_function(tolua_S,"Collision_Instance",tolua_main_Collision_Instance00);
  tolua_constant(tolua_S,"CT_None",CT_None);
  tolua_constant(tolua_S,"CT_Player",CT_Player);
  tolua_constant(tolua_S,"CT_Brick",CT_Brick);
  tolua_constant(tolua_S,"CT_Kuribou",CT_Kuribou);
  tolua_constant(tolua_S,"CT_NUM",CT_NUM);
  tolua_function(tolua_S,"Collision_RegisterS",tolua_main_Collision_RegisterS00);
  tolua_function(tolua_S,"Collision_Unregister",tolua_main_Collision_Unregister00);
  tolua_function(tolua_S,"Collision_MoveS",tolua_main_Collision_MoveS00);
  tolua_function(tolua_S,"Collision_ResultGetPosLeftX",tolua_main_Collision_ResultGetPosLeftX00);
  tolua_function(tolua_S,"Collision_ResultGetPosBottomY",tolua_main_Collision_ResultGetPosBottomY00);
  tolua_constant(tolua_S,"CR_NotCollided",CR_NotCollided);
  tolua_constant(tolua_S,"CR_Bounced",CR_Bounced);
  tolua_constant(tolua_S,"CR_Lose",CR_Lose);
  tolua_constant(tolua_S,"CR_Win",CR_Win);
  tolua_constant(tolua_S,"CR_NUM",CR_NUM);
  tolua_function(tolua_S,"Collision_ResultGetResultType",tolua_main_Collision_ResultGetResultType00);
  tolua_function(tolua_S,"Collision_ResultGetVX",tolua_main_Collision_ResultGetVX00);
  tolua_function(tolua_S,"Collision_ResultGetVY",tolua_main_Collision_ResultGetVY00);
  tolua_function(tolua_S,"Collision_ResultIsLanded",tolua_main_Collision_ResultIsLanded00);
 tolua_endmodule(tolua_S);
 return 1;
}


#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
 TOLUA_API int luaopen_main (lua_State* tolua_S) {
 return tolua_main_open(tolua_S);
};
#endif

